Cognitive Rigidity, Habitual Tendencies, and Obsessive-Compulsive Symptoms: Individual Differences and Compensatory Interactions

Recent theories have posited a range of cognitive risk factors for obsessive-compulsive disorder (OCD), including cognitive inflexibility and a maladaptive reliance on habits. However, empirical and methodological inconsistencies have obscured the understanding of whether inflexibility and habitual tendencies indeed shape OCD symptoms in clinical and sub-clinical populations, and whether there are notable interactions amongst these traits. The present investigation adopted an interactionist individual differences approach to examine the associations between behaviorally-assessed cognitive flexibility and subclinical OCD symptomatology in a healthy population. It also explored the nature of the interactions between cognitive flexibility and habitual tendencies, and the degree to which these cognitive traits predict subclinical OCD symptomatology. Across two studies, including a preregistration, Bayesian and regression analyses revealed that cognitive inflexibility and compulsive habitual tendencies act as unique and independent predictors of subclinical OCD symptomatology in healthy populations. Furthermore, there was a significant interaction between cognitive rigidity and habitual compulsivity, which accounted for 49.4% of the variance in subclinical OCD symptomatology in Study 1, and 37.3% in Study 2. In-depth analyses revealed a compensatory effect between cognitive inflexibility and habitual compulsivity such that both are necessary for OCD symptomatology, but neither is sufficient. These results imply that in order to generate reliable and nuanced models of the endophenotype of OCD symptomatology, it is essential to account for interactions between psychological traits. Moreover, the present findings have important implications for theories on the cognitive roots of OCD, and potentially in the development of interventions that target both cognitive inflexibility and habitual compulsivity.

Recent theories have posited a range of cognitive risk factors for obsessivecompulsive disorder (OCD), including cognitive inflexibility and a maladaptive reliance on habits. However, empirical and methodological inconsistencies have obscured the understanding of whether inflexibility and habitual tendencies indeed shape OCD symptoms in clinical and sub-clinical populations, and whether there are notable interactions amongst these traits. The present investigation adopted an interactionist individual differences approach to examine the associations between behaviorallyassessed cognitive flexibility and subclinical OCD symptomatology in a healthy population. It also explored the nature of the interactions between cognitive flexibility and habitual tendencies, and the degree to which these cognitive traits predict subclinical OCD symptomatology. Across two studies, including a preregistration, Bayesian and regression analyses revealed that cognitive inflexibility and compulsive habitual tendencies act as unique and independent predictors of subclinical OCD symptomatology in healthy populations. Furthermore, there was a significant interaction between cognitive rigidity and habitual compulsivity, which accounted for 49.4% of the variance in subclinical OCD symptomatology in Study 1, and 37.3% in Study 2. In-depth analyses revealed a compensatory effect between cognitive inflexibility and habitual compulsivity such that both are necessary for OCD symptomatology, but neither is sufficient. These results imply that in order to generate reliable and nuanced models of the endophenotype of OCD symptomatology, it is essential to account for interactions between psychological traits. Moreover, the present findings have important implications for theories on the cognitive roots of OCD, and potentially in the development of interventions that target both cognitive inflexibility and habitual compulsivity.

INTRODUCTION
Obsessive-compulsive disorder (OCD) is a highly debilitating condition affecting between 1.1 and 1.8% of the population worldwide (1). It is characterized by unpleasant, unwanted obsessive thoughts, and repetitive compulsive rituals to try and neutralize these thoughts, and as such, can severely impair all aspects of quality of life (2). Elucidating the cognitive underpinnings of OCD is of great importance in improving our understanding of this condition to better help patients. In order to do this, we must appreciate the spectral nature of psychiatric conditions and the variability in their manifestations between individuals, and thus taking a dimensional approach is valuable. A clear evidence-based endophenotype may allow identification of individuals with a predisposition for OCD, and the development of more targeted screening measures and interventions. A number of theories have been proposed to explain the cognitive processes underlying OCD symptoms, and there have been several attempts to develop a unified account of the origins of OCD [e.g., (3,4)], but as yet there are still substantial ambiguities and empirical inconsistencies.
Over the years, patterns of executive dysfunction in OCD have been extensively studied. These have suggested that deficits in certain domains of executive function, such as set shifting and inhibition, are relatively specific to OCD, while other domains such as planning, verbal fluency and working memory, are less impaired (5,6). Furthermore, these deficits in set shifting and inhibition are trait-like, "stable characteristics that are consistently deviant from normal even during remission" [(5), p. 1032], meaning that they are independent of symptomatology, and thus may play an etiological role in the development or maintenance of OCD (5). These findings are supported by neuroimaging studies demonstrating under-activation in dorsal frontal-striatal regions in OCD patients during task-switching, while healthy controls showed significant activation in these areas (7).
These findings have led to an interest in the study of excessive cognitive rigidity in OCD [e.g., (8,9)]. Experimentally, cognitive flexibility has widely been shown to be impaired in OCD [e.g., (9)], as well as in obsessive-compulsive personality disorder (OCPD) (10,11), the latter being characterized by extreme perfectionism, order and neatness, often associated with anxiety, with a prevalence of 3-8% in adult populations (12). However, impaired cognitive flexibility has not been demonstrated to such an extent in other obsessive-compulsive spectrum disorders (OCSDs) such as trichotillomania (13), or other psychiatric disorders such as generalized anxiety disorder (14,15). This suggests that low cognitive flexibility may act as a specific predictor of OCD, providing support for cognitive flexibility accounts of OCD. Impaired cognitive flexibility has also been demonstrated in unaffected first-degree relatives of both adult (8) and pediatric (6) OCD patients, suggesting that it may be an endophenotype (a heritable, intermediate marker of risk between phenotype and genetics) of OCD. Furthermore, this may be specific to OCD, as cognitive flexibility does not seem to be an endophenotype for other psychiatric disorders such as schizophrenia (16). The combination of clinically observed rigidity, and trait-like and even endophenotypic cognitive inflexibility in OCD patients, accounts for the focus on cognitive inflexibility as a potential causal factor, and highlights the importance of further study in this area.
Nonetheless, there has been some dispute over the association between cognitive inflexibility and OCD, with some studies finding broad impairments in executive function in patients with OCD (17,18), rather than specific deficits in cognitive flexibility. A meta-analysis conducted by Fradkin et al. (19) found no evidence for impaired cognitive flexibility in OCD. However, this only included studies using measures of flexibility that are externally-cued (or reactive), such as set-shifting and taskswitching, in which the participant must switch by reacting to cues, but not measures of self-directed (or generative) flexibility, in which the participant must internally generate the switching. Dissociations between performance on externally-cued and selfdirected measures of cognitive flexibility have previously been demonstrated in patients with Parkinson's disease (20), and furthermore, the two types of cognitive flexibility have distinct neural correlates (21). Therefore, it may be that different paradigms in fact measure different aspects of the cognitive flexibility construct, and that only certain aspects of cognitive flexibility are impaired in OCD.
Another possible explanation for these conflicting findings may be that patients with clinical OCD often show more general cognitive impairment due to comorbidity with other forms of psychiatric disorder (22). It is thus of great value to study cognitive flexibility in subclinical populations to eliminate this confounding factor. In addition, as clinical and subclinical obsessive-compulsive symptoms share similar features and are continuous with one another (22), cognitive inflexibility in subclinical OCD may be a predisposing factor for the development of OCD. Impaired cognitive flexibility has been demonstrated in subclinical OCD by Sternheim et al. (23), using a set-shifting task and a self-report measure of cognitive flexibility. Although this study provides strong support for the cognitive inflexibility specificity hypothesis of OCD, the participants were all female students within a narrow age range. Student populations can be expected to show relatively high levels of cognitive ability, and so the sample may not be representative of the general population. Additionally, this study used an externally-cued, rather than self-directed, paradigm to measure behavioral flexibility. The present study aims to demonstrate the relationship between cognitive flexibility and subclinical OCD symptoms in more representative samples, using a self-directed, generative measure of cognitive flexibility, the Alternative Uses Task, AUT (24)(25)(26)57). As well as flexibility, the AUT is also scored on elaboration, fluency and originality, which can act as controls for other cognitive processes, ensuring that inferences are based on flexibility specifically and not general cognitive ability or fluency.
Another longstanding theory of the cognitive origins of OCD, proposed by Graybiel and Rauch (27), is that OCD may be a clinical manifestation of an over-reliance on habits, involving maladaptive habit learning. Studies in both animals and humans have found evidence for a shift from goal-directed to habitual control in OCD, using behavioral measures such as outcome devaluation (28) and contingency degradation (29), as well as self-report measures of habits (60). However, very few studies have explored how individual differences in habitual tendencies may be associated with subclinical OCD traits in the general population [see (30)], and this analysis is crucial in order to augment our understanding of preliminary or predisposing OCD traits.
An apparent interplay between the different neural and cognitive mechanisms underlying OCD has led to suggestions that an interaction of several factors underlies OCD and its subtypes (4). This dimensional model suggests that the interaction of three factors (anxiety or emotional vulnerability, cognitive inflexibility, and an imbalance between goal-directed and habitual control over behavior) results in the development of OCD (4). To the best of our knowledge, previous studies have not explored whether this interaction is present, and if so, whether it may have a role in predicting or screening for clinical OCD. Therefore, the present study aims to determine whether individual differences in habitual tendencies and cognitive flexibility may interact to predict subclinical OCD symptomatology.
Consequently, the objectives of the present study were twofold: firstly, to examine the extent to which behaviourallyassessed cognitive flexibility is negatively related to subclinical OCD symptomatology; and secondly, to explore the nature of any interactions between habitual tendencies and cognitive flexibility to study whether these, in conjunction, may predict OCD traits.

STUDY 1
Study 1 sought to investigate associations between cognitive flexibility, subclinical OCD symptomatology, and the Habitual Tendencies Questionnaire (HTQ), in order to improve our understanding of the cognitive processes underlying OCD traits in the general population.
We addressed two main hypotheses as follows: H1-Cognitive flexibility is negatively correlated with levels of OCD traits [as cognitive flexibility has been shown to be impaired in subclinical OCD, e.g., (23)] or OCPD [e.g., (10)].
H2-Habitual tendencies measured by the HTQ interact with cognitive flexibility in predicting OCD traits [due to OCD involving an over-reliance on habits, e.g., (27)].

Participants
For Study 1, 165 participants were recruited through Amazon Mechanical Turk (MTurk) online platform, which is well established in obtaining samples of the general population (31), and each participant was paid $4.50. Prior to data analysis, 35 participants (21.2%) were removed due to failure of attention checks and repeat participation in the study identified via repeated answers in the Alternative Uses Task (AUT) and by duplicated IP addresses. One hundred and thirty participants remained, all of whom were between the ages of 22 and 73 (M = 39.527, SD = 12.120), and based in the United States of America. The gender, ethnicity and educational achievement demographics of the sample are shown below in Table 1. Ethical Master's degree 15 12 Doctoral or Professional degree 3 2 approval for the study was acquired from the Department of Psychology Ethics Committee of the University of Cambridge. In line with the Declaration of Helsinki (1964), electronic informed consent was obtained from all participants before beginning the survey, and participants were notified that they may terminate their participation in the study at any point.

Measures
We administered the measures in the form of an electronic survey. In order to measure habitual tendencies, we used the 11item HTQ, which was rated on 7-point Likert scales ranging from "Strongly disagree" to "Strongly agree, " and had an acceptable Cronbach's α value of 0.764. To measure subclinical OCD symptomatology, we used the 18-item revised version of the Obsessive-Compulsive Inventory, OCI (32), which was rated on 5-point Likert scales ranging from "Not at all" to "Extremely, " and had a high Cronbach's α value of 0.954 (M = 16.462, SD = 15.268). Example items include: "I check things more often than necessary, " and "I am upset by unpleasant thoughts that come into my mind against my will". In order to measure cognitive flexibility and divergent thinking, we used the Alternative Uses Task (AUT), in which participants have 90 s in which to name as many different uses of a particular object as they can. In our survey, we administered two rounds of this task, using a brick and a newspaper as the objects, and averaged responses were  were concentrating on their responses to the questions ("I am paying attention to this survey. I strongly agree").

Correlational Analysis
In order to consider any confounding variables, we examined the correlations between the demographic variables and the psychological variables of interest. Age was found to be negatively correlated with the OCI (r = −0.236, p = 0.007), and positively correlated with AUT elaboration (r = 0.291, p < 0.001) and AUT originality (r = 0.191, p = 0.030). Gender differences were present for Preference for Regularity, t (127) = −2.892, p = 0.005, with females scoring more highly than males. Educational attainment was negatively correlated with Preference for Regularity (r = −0.226, p = 0.010). Therefore, the demographic variables of age, gender and educational attainment were included as covariates in further analyses.

Relationship Between Cognitive Flexibility and Subclinical OCD Traits
In order to evaluate the relationships between cognitive flexibility and subclinical OCD symptomatology, we computed the Pearson's correlations for these variables (see Table 2). Table 2 and Figure 1, there was a significant negative correlation between AUT Flexibility and the OCI (r = −0.390, p < 0.001), as hypothesized, suggesting that individuals with increased subclinical OCD traits have a tendency toward increased cognitive rigidity, or decreased cognitive flexibility. The Pearson's r effect size of −0.390 is relatively large, as per the individual differences research guidelines set out by Gignac and Szodorai (36).

As evident in
To complement the Pearson's correlations, we also examined the Bayes Factors (see Table 2), which quantify the evidential strength in favor of a significant correlation given the present data (H 1, the alternative hypothesis), or in favor of no significant correlation given the present data (H 0 , the null hypothesis). In The bold values indicate statistically significant values.
line with the guidelines by Wagenmakers et al. (37), a Bayes Factor (BF 10 ) above 100 indicates "extreme evidence" for H 1 (significant correlation). Here we found that the relationship between AUT Flexibility and the OCI possesses an extremely large Bayes Factor of 3,557.577 (see Table 2), indicating that the observed data is 3,557.577 times more likely under H 1 than H 0 .

Relationship Between HTQ and Subclinical OCD Traits
There was a significant positive correlation between habitual tendencies, measured by the HTQ, and subclinical OCD traits, measured by the OCI (r = 0.484, p < 0.001). Of the three HTQ subscales, Compulsivity showed the strongest correlation with the OCI (r = 0.598, p < 0.001), and this relationship possessed an extremely large Bayes Factor of 1.474 × 10 11 (see Table 2), indicating that the observed data is 1.474 × 10 11 times more likely under H 1 (significant correlation) than H 0 (no correlation). As this Bayes Factor value is above 100, it indicates "extreme evidence" for H 1 , in line with the guidelines from Wagenmakers et al. (37).

Cognitive Predictors of Subclinical OCD Symptomatology
A simultaneous hierarchical regression was conducted with the three HTQ subscales and the four AUT components as predictors of subclinical OCD symptomatology (see Table 3).
Both HTQ Compulsivity and AUT Flexibility emerged as significant predictors of the OCI. Higher Compulsivity and lower cognitive flexibility predicted greater levels of subclinical OCD traits. As shown in Table 3, HTQ Compulsivity and cognitive flexibility were significant and unique predictors of the OCI. In order to examine whether there was a significant interaction between these two predictors, hierarchical linear regression was then conducted (see Table 4). In Step 1, the demographic variables age, gender and educational attainment were entered as covariates. As shown in Table 4, age was a significant negative predictor of subclinical OCD symptomatology, such that older participants exhibited lower levels of subclinical OCD symptomatology than younger participants in the present sample. In Step 2, HTQ compulsivity and cognitive flexibility were added, both of which were significant predictors of subclinical OCD symptomatology. HTQ Compulsivity had a positive relationship with the OCI (β = 0.542, p < 0.001) and cognitive flexibility had a negative relationship with the OCI (β = −0.324, p < 0.001). These independent variables accounted for a significant proportion of the variance in subclinical OCD symptomatology (r 2 = 0.476). In Step 3, the interaction term for HTQ Compulsivity and cognitive flexibility was entered. There was a significant interaction effect between compulsivity and cognitive flexibility, as shown in Table 4, with β = −0.547, p = 0.039. The interaction term increased the r 2 value to 0.494, thus accounting for a further 1.8% of the variance in subclinical OCD symptomatology.

Interaction Effects Between Habitual Compulsivity, Cognitive Flexibility, and Subclinical OCD Traits
We then conducted simple slope analyses (SSA) to investigate the association between cognitive flexibility and subclinical OCD symptomatology at 1 standard deviation (SD) above and below mean HTQ Compulsivity, with age, gender and educational attainment as covariates (see Figure 2A). A significant negative relationship was found between cognitive flexibility and subclinical OCD symptomatology when HTQ Compulsivity was high (at +1 SD, b = −4.52, p < 0.001), while no significant relationship was found when HTQ Compulsivity was low (at Carrying out the reciprocal SSA to investigate the association between HTQ Compulsivity and subclinical OCD symptomatology (see Figure 2B) demonstrated that there were significant positive relationships between HTQ Compulsivity and subclinical OCD symptomatology both when cognitive flexibility was high (at +1 SD, b = 1.12, p < 0.001), and when it was low (at −1 SD, b = 1.92, p < 0.001). The interaction effects between HTQ Compulsivity and cognitive flexibility (measured by the AUT) are shown in the filled contour plot in Figure 2C. This shows that the relationship between HTQ Compulsivity and subclinical OCD symptomatology varies depending on cognitive flexibility, such that at high levels but not low levels of HTQ Compulsivity, cognitive flexibility differentiates between high and low levels of subclinical OCD symptomatology. It also shows that the relationship between cognitive flexibility and subclinical OCD symptomatology varies depending on HTQ Compulsivity, such that at both high and low levels of cognitive flexibility, HTQ Compulsivity differentiates between high and low levels of subclinical OCD symptomatology. The highest levels of subclinical OCD traits were observed in participants with high HTQ Compulsivity scores and low AUT Flexibility scores, indicating a compensatory effect, in accordance with the significant interaction effect shown in the hierarchical linear regression (see Table 4). Meanwhile, the lowest levels of subclinical OCD traits were observed in participants with low HTQ Compulsivity scores, regardless of their AUT Flexibility scores. Therefore, high HTQ Compulsivity and low cognitive flexibility are necessary for the highest levels of subclinical OCD symptomatology, while neither is sufficient independently. These findings are in line with those from the SSA analyses. We used the Johnson-Neyman technique to analyze this interaction further (58). This technique complements simple slope analysis, as it calculates the specific values of the moderator at which the predictor transitions from non-significant to significant, rather than using potentially arbitrary conditional values of the moderator (59). This indicated that the association between cognitive flexibility and OCD was significantly negative at compulsivity scores of 8.35 and above (see Figure 2D).

Interim Discussion
Study 1 has demonstrated that both cognitive inflexibility and compulsive habitual tendencies act as significant independent predictors of subclinical OCD symptomatology. Furthermore, hierarchical regression showed that cognitive inflexibility and compulsive habitual tendencies interact, accounting for a significant proportion of the variance in OCD traits. Simple slope analyses further defined this interaction, revealing that the negative relationship between cognitive flexibility and OCD traits was significant at high but not low levels of habitual compulsivity, suggesting that habitual compulsivity acts as a moderator of the association between cognitive inflexibility and subclinical OCD symptomatology. Finally, as shown in Figure 2C, the highest levels of OCD traits were observed in individuals with low cognitive flexibility and high habitual compulsivity, implying a compensatory effect. Therefore, both low levels of cognitive flexibility and high levels of compulsive habitual tendencies are necessary for the highest levels of subclinical OCD symptoms.

STUDY 2
Study 1 demonstrated that cognitive inflexibility and habitual compulsivity independently predict subclinical symptomatology, and that habitual compulsivity moderates the negative association between cognitive flexibility and OCD traits, such that it is significant at high but not low levels of habitual compulsivity. Study 2 was conducted in order to reproduce the findings of Study 1 in a larger sample. The aims of Study 2 were as follows: (1) to replicate the relationships of cognitive flexibility and compulsive habitual tendencies with OCD traits (as measured by the OCI); (2) to replicate the interaction effect between cognitive flexibility and compulsive habitual tendencies in predicting OCD traits. Study 2 was preregistered on the Open Science Framework at the following link as "Hypothesis #5": https://osf.io/3ag79/? view_only=b9fd67d034c7425dbf559c05d2421cb3. After the preregistration, some changes were made as follows: the data for binge eating, alcohol addiction, smoking habits and apathy were not analyzed in relation to habitual tendencies, as this was beyond the scope of the present paper.

Methods
The Methods for Study 2 followed the same procedure as for Study 1, to ensure the study replication was reliable. We reproduce them here for completeness.

Participants
For study 2, 385 participants were recruited through Amazon Mechanical Turk (MTurk) online platform, and each participant was paid $4.50. Prior to data analysis, 126 participants (32.7%) were removed, in line with guidance from Meade and Craig (38) due to: failure of one or both attention checks (n = 28), being identified as a bot via repeated answers in the AUT (n = 62), poor English proficiency identified by lack of understanding of the AUT through irrelevant or incoherent answers (n = 20), lack of effort operationalized as ≤1 responses on the AUT (n = 5), repeat participation in the study identified via duplicated IP addresses (n = 8), and finally ≥1 missing answers on the HTQ (n = 3). Two hundred and fifty-nine participants remained, all of whom were between the ages of 19 and 73 (M = 37.372, SD = 11.280), and based in the United States of America. The gender, ethnicity and educational achievement demographics of the sample are shown below in Table 5. Ethical approval for the study was acquired from the Department of Psychology Ethics Committee of the University of Cambridge. In line with the Declaration of Helsinki (1964), electronic informed consent was obtained from all participants before beginning the survey, and participants were notified that they may terminate their participation in the study at any point.

Measures
We administered the HTQ (30), rated on 7-point Likert scales ranging from "Strongly disagree" to "Strongly agree, " along with the additional measures and cognitive tasks, in the form of an electronic survey hosted by Qualtrics Survey Software.  The survey also included two interspersed attention checks, again as in Study 1.

Correlational Analysis
Similarly to Study 1, in order to consider any confounding variables, we examined the correlations between the demographic variables and the psychological variables of interest. Age was found to be negatively correlated with Compulsivity (r = −0.212, p < 0.001) and the OCI (r = −0.277, p < 0.001), and positively correlated with Aversion to Novelty (r = 0.178, p = 0.004), AUT elaboration (r = 0.141, p < 0.024) and AUT fluency (r = 0.141, p = 0.024). Gender differences were present for Aversion to Novelty, t (255) = −2.128, p = 0.034; and AUT fluency, t (252) = −2.604, p = 0.010, with females scoring more highly than males in both Aversion to Novelty and AUT fluency. Educational attainment was not significantly correlated with any of the three subscales, AUT measures, or the OCI. Therefore, the demographic variables of age and gender were included as covariates in further analyses.

Relationship Between Cognitive Flexibility and Subclinical OCD Traits
In order to evaluate the relationships between cognitive flexibility and subclinical OCD symptomatology, we computed the Pearson's correlations for these variables (see Table 6). Table 6 and Figure 3, there was a significant negative correlation between AUT Flexibility and the OCI (r = −0.362, p < 0.001), as hypothesized, suggesting that individuals  with increased subclinical OCD traits have a tendency toward increased cognitive rigidity, or decreased cognitive flexibility. The Pearson's r effect size of −0.362 is relatively large, as per the individual differences research guidelines set out by Gignac and Szodorai (36).

As evident in
To complement the Pearson's correlations, we also examined the Bayes Factors (see Table 6), which demonstrated that the relationship between AUT Flexibility and the OCI possesses an extremely large Bayes Factor of 2.193 × 10 6 (see Table 6), indicating that the observed data is 2.193 × 10 6 times more likely under H 1 (significant correlation) than H 0 (no correlation). As this Bayes Factor value is above 100, it indicates "extreme evidence" for H 1

Relationship Between HTQ and Subclinical OCD Traits
There was a significant positive correlation between habitual tendencies, measured by the HTQ, and subclinical OCD traits, measured by the OCI (r = 0.258, p < 0.001). Of the three HTQ subscales, Compulsivity showed the strongest correlation with the OCI (r = 0.461, p < 0.001), and this relationship possessed an extremely large Bayes Factor of 5.094 × 10 11 (see Table 6), indicating that the observed data is 5.094 × 10 11 times more likely under H 1 (significant correlation) than H 0 (no correlation).

Cognitive Predictors of Subclinical OCD Symptomatology
We then carried out a multiple regression with the three HTQ subscales and the four AUT components as predictors of subclinical OCD symptomatology (see Table 7). Both HTQ Compulsivity and AUT Flexibility emerged as significant predictors of the OCI. Higher Compulsivity and lower cognitive flexibility predicted greater levels of subclinical OCD traits.
As shown in Table 7, HTQ Compulsivity and cognitive flexibility (as measured by the AUT) were significant and unique predictors of the OCI. In order to examine whether there was a significant interaction between these two predictors, hierarchical linear regression was then conducted (see Table 8). In Step 1, the demographic variables age and gender were entered as covariates.
As shown in Table 8, age was a significant negative predictor of subclinical OCD symptomatology, such that older participants exhibited lower levels of subclinical OCD symptomatology than younger participants in the present sample. In Step 2, HTQ compulsivity and cognitive flexibility (as measured by the AUT) were added, both of which were significant predictors of subclinical OCD symptomatology. HTQ Compulsivity had a positive relationship with the OCI (β = 0.416, p < 0.001) and cognitive flexibility had a negative relationship with the OCI (β = −0.330, p < 0.001). These independent variables accounted for a significant proportion of the variance in subclinical OCD symptomatology (r 2 = 0.352). In Step 3, the interaction term for HTQ Compulsivity and cognitive flexibility was entered. There was a significant interaction effect between compulsivity and cognitive flexibility, as shown in Table 8, with β = −0.706, p = 0.004. The interaction term increased the r 2 -value to 0.373, thus accounting for a further 2.1% of the variance in subclinical OCD symptomatology.

Interaction Effects Between Habitual Compulsivity, Cognitive Flexibility, and Subclinical OCD Traits
Simple slope analyses (SSA) were conducted to investigate the association between cognitive flexibility and subclinical OCD symptomatology at 1 standard deviation (SD) above and below mean HTQ Compulsivity, with age and gender as covariates (see Figure 4A). A significant negative relationship was found between cognitive flexibility and subclinical OCD symptomatology when HTQ Compulsivity was high (at +1 SD, b = −2.32, p < 0.001), while no significant relationship was found when HTQ Compulsivity was low (at −1 SD, b = −0.68, p = 0.11). Carrying out the reciprocal SSA to investigate the association between HTQ Compulsivity and subclinical OCD symptomatology (see Figure 4B) demonstrated that there were significant positive relationships between HTQ Compulsivity and subclinical OCD symptomatology both when cognitive flexibility was high (at +1 SD, b = 0.76, p < 0.001), and when it was low (at −1 SD, b = 1.62, p < 0.001). The interaction effects between HTQ Compulsivity and cognitive flexibility (measured by the AUT) are shown in the filled contour plot in Figure 4C. This shows that the relationship between HTQ Compulsivity and subclinical OCD symptomatology varies depending on cognitive flexibility, such that at high levels but not low levels of HTQ Compulsivity, cognitive flexibility differentiates between high and low levels of subclinical OCD symptomatology. It also shows that the relationship between cognitive flexibility and subclinical OCD symptomatology varies depending on HTQ Compulsivity, such that at both high and low levels of cognitive flexibility, HTQ Compulsivity differentiates between high and low levels of subclinical OCD symptomatology. The highest levels of subclinical OCD traits were observed in participants with high HTQ Compulsivity scores and low AUT Flexibility scores, indicating a compensatory effect, in accordance with the significant interaction effect shown in the hierarchical linear regression (see Table 8). Meanwhile, the lowest levels of subclinical OCD traits were observed in participants with low HTQ Compulsivity scores, regardless of their AUT Flexibility scores. Therefore, high HTQ Compulsivity and low cognitive flexibility are necessary for the highest levels of subclinical OCD symptomatology, while neither is sufficient independently. These findings are in line with those from the SSA analyses. We used the Johnson-Neyman technique to analyze this interaction further (58), which indicated that the association between cognitive flexibility and OCD traits was significantly negative at compulsivity scores of 8.12 and above (see Figure 4D).

DISCUSSION
The present study has demonstrated that behaviourally-assessed cognitive inflexibility predicts high levels of OCD traits in the general population, and that cognitive inflexibility interacts with habitual compulsivity to predict the highest severity of OCD symptoms. Notably, both rigidity and habitual compulsivity are necessary, and neither is sufficient alone for high OCD symptoms. Thus, in line with our first hypothesis, H1, individuals with lower cognitive flexibility showed increased subclinical OCD symptomatology. In line with our second hypothesis, H2, cognitive inflexibility interacted with habitual compulsivity to account for 49.4% of the variance in subclinical OCD symptomatology in Study 1, and 37.3% in Study 2, demonstrating reproducibility across two independent samples. Simple slope analyses demonstrated that cognitive inflexibility differentiated between high and low levels of OCD traits when habitual compulsivity was high, but not when it was low, suggesting that habitual compulsivity moderates the negative relationship between cognitive flexibility and subclinical OCD symptomatology. Thus, in a group of individuals with low habitual compulsivity, individuals with high cognitive flexibility will have low levels of OCD symptoms, but this effect will not be visible in individuals with high habitual compulsivity. Furthermore, the highest levels of OCD traits were seen in participants with high HTQ Compulsivity scores and low AUT Flexibility scores, suggesting a compensatory effect (see Figures 2C, 4C). The present study demonstrated cognitive rigidity to be a significant independent predictor of OCD traits. This provides support for cognitive flexibility accounts of OCD, and suggests that impaired cognitive flexibility may be one of the core cognitive underpinnings of OCD. Across the literature, there is marked variation in methods of measuring cognitive flexibility, and this may help to explain the heterogeneity of the findings concerning impaired cognitive flexibility in OCD. Cognitive flexibility is a complex multidimensional construct that has been subdivided in a number of different ways. For example, it may be broken down according to the various tasks used to measure it, including set shifting, reversal learning, cued task switching, and cognitive or motor inhibition tasks (39). Kanen et al. (40) further subdivided one of these tasks, and demonstrated that a subcomponent of probabilistic reversal learning was increased in individuals with substance use disorder, but decreased in individuals with OCD, relative to controls. Similarly, a metaanalysis by Chamberlain et al. (41) found that extra-dimensional, but not intra-dimensional, set-shifting is consistently impaired in OCD. These findings suggest that not all aspects of cognitive flexibility may be impaired in OCD. The difficulty with which rule changes may be detected, and thus the levels of feedback processing required, varies across the wide range of tasks used to measure cognitive flexibility (19). Therefore, deficits in feedback processing may, in part, account for the cognitive inflexibility found in OCD (19). The use of self-directed tasks to measure cognitive flexibility, such as the AUT used in the present study, may eliminate the confounding effects of feedback processing, as the shifting is internally generated. Therefore, these tasks may be able to specifically target the subdimensions of cognitive flexibility impaired in OCD.
The subdivision of cognitive flexibility into its constituent parts may be an important future direction in gaining more specific insight into the cognitive processes underlying OCD, as well as the heterogeneity of OCD symptoms (42). Indeed, another explanation for the highly mixed nature of the literature regarding the cognitive deficits associated with OCD may be the wide range of its clinical presentations. In a meta-analysis by Bragdon et al. (42), increased symmetry and ordering symptoms were associated with reduced cognitive flexibility (measured using a mixture of externally-cued and self-directed tasks across the included studies) and verbal working memory, while increased obsessing and checking symptoms were associated with poorer memory and verbal memory. Therefore, in addition to the subdivision of constructs such as cognitive flexibility, it may also be important to separate OCD into its different symptom groups, in order to gain more specific insight into its cognitive underpinnings.
Furthermore, the moderation of cognitive flexibility by habitual tendencies adds nuance to the habit hypothesis of OCD proposed by Graybiel and Rauch (27), suggesting that cognitive flexibility must be studied along with habitual tendencies, thus building on previous contributions to this debate. For example, Gillan et al. (43) found that excessive habits in OCD patients were associated with hyperactivation in the caudate nucleus, an important region for goal-directed behavior that is implicated in the pathophysiology of OCD. Therefore, habit-forming biases in OCD may be a result of impairments in this neural circuitry. Another study by Gillan et al. (28) used outcome devaluation paradigms to demonstrate increased habitual tendencies in OCD patients. As the tasks used in Gillan et al. (28) study did not involve obsessions, it has been suggested that the tendency toward developing compulsive-like habits in OCD is independent of obsessions, and thus compulsions are a core component of OCD (44). Gillan et al. (45) further found that individuals with OCD showed increased habitual responding in a shock-avoidance paradigm, and when trying to explain their behavior, erroneously deduced that if they felt compelled to perform the habitual response, then there must be something to fear. In contrast with the majority of the preceding literature on OCD, this reverse inference suggests that obsessions may in fact arise as a result of compulsions. This provides further evidence for the habit hypothesis of OCD, and emphasizes the importance of studying compulsivity in relation to habits and OCD. The HTQ, and in particular its Compulsivity subscale, may be valuable as a predictive or screening measure for OCD traits (30). The present study extends the potential applications of the HTQ, such that it may be used in conjunction with measures of cognitive flexibility as an even stronger predictor of subclinical OCD symptomatology.
The moderation of cognitive flexibility by habitual tendencies suggests that neither construct alone is sufficient to explain the roots of OCD, but that the interactions between the two must be studied in order to develop more comprehensive theories. A recent review conducted by Fullana et al. (46) was unable to identify any biomarkers with diagnostic specificity for OCD. However, as biomarkers are only one small aspect of the RDoC framework, perhaps more integrative RDoC approaches using combinations of biomarkers and their interactions with other constructs may provide a solution. In addition, future use of interactionist, individual differences approaches may help to explain past empirical inconsistencies regarding excessive cognitive inflexibility and habitual tendencies in OCD [e.g., (17,18,47)].
The importance of studying individual differences in cognitive flexibility, habitual tendencies, and the interactions between them in order to elucidate the cognitive processes underlying OCD is emphasized by neurobiological findings. Vaghi et al. (48) discovered that reduced functional connectivity between the caudate and the ventrolateral prefrontal cortex was selectively associated with reduced cognitive flexibility, while reduced functional connectivity between the putamen and the dorsolateral prefrontal cortex was selectively associated with goal-directed performance, as well as OCD symptom severity. Another double dissociation was found by Tyagi et al. (49), who showed that anteromedial subthalamic nucleus deep brain stimulation in patients with treatment refractory OCD selectively improved cognitive flexibility, while ventral capsule/ventral striatal deep brain stimulation selectively improved mood. Deep brain stimulation at each site independently reduced OCD symptoms. The above neurobiological findings are reflected in the integrated model of OCD proposed by Robbins et al. (4), and corroborate the importance of the three main factors in OCD of varying severity, namely cognitive inflexibility; habitual rather than goal-directed behavior; and mood. Furthermore, these neurobiological findings have potential therapeutic applications for those suffering from severe, treatment-refractory OCD.
In order to ensure that the present study was well-powered to detect the present effects, we conducted a conservative posthoc power analysis (α = 0.001, n = 130 for Study 1; n = 259 for Study 2), using the pwr package in the statistical software R Studio. For the effect sizes, we used the smallest relevant Pearson's correlations: 0.390 for Study 1 and 0.362 for Study 2, which reflected the correlations between AUT flexibility and the OCI (see Tables 1, 4). This revealed power of 0.912 for Study 1 and 0.997 for Study 2, indicating that the sample sizes were sufficient. Future studies using even larger sample sizes would help to replicate and extend the present findings. The present investigation furthers our understanding of the cognitive underpinnings of obsessive-compulsive symptoms, illustrating their interactive underpinnings in rigidity and habitual tendencies. Replication of these findings in children and adolescents would be useful in considering developmental trajectories and in exploring whether early compulsivity or cognitive rigidity can help to predict the development of OCD in later life. This could have important implications in the development of early interventions for OCD. Notably, adolescents with OCD do not show deficits in performance on the Wisconsin Card Sort Test, an externally-cued measure of cognitive flexibility (50), and as such, an important future direction would be to administer a self-directed measure of cognitive flexibility, such as the AUT, in this age group. In order to explore whether the present findings are consistent across cultural contexts, cross-cultural replication is imperative. Interestingly, cognitive rigidity may also account for the finding of heightened moral rigidity in OCD (51). Furthermore, impaired cognitive flexibility is not a characteristic limited to OCD, but has been demonstrated in other disorders, such as binge eating disorder (52) and addictions (53). Therefore, it is important to explore whether habitual tendencies, especially compulsivity, interact with cognitive inflexibility to predict symptom severity in these other conditions, or whether this interaction effect is specific to OCD.
The present study is not without its limitations. Firstly, the use of an online convenience sample may not be representative of the general population, and so future research may administer the study in a laboratory setting or a population sampled specifically for representativeness. Secondly, although the present findings are in a healthy population without any formal clinical diagnoses of OCD, a number of participants did show high levels of OCD symptoms, with mean OCI-R scores of 16 in both samples. Although this is just above the cut-off score of 15 for mild vs. moderate severity in Abramovitch et al. (54) paper, it is well below the cut-off score of 21 for clinical OCD suggested by the developers of the OCI-R (32). Nevertheless, replication in samples with lower mean OCI scores, as well as in patients with clinically diagnosed OCD and OCPD would be valuable. A limitation of the OCI-R used in the present study is its inclusion of hoarding, which has recently been suggested to be a separate disorder. A fine-grained approach to OCI symptom specificity is thus encouraged in future studies. Thirdly, anxiety and depression may also be associated with lower cognitive flexibility, so future studies may address this by controlling for these factors. Finally, the present study focuses on one aspect of the cognitive flexibility construct, by using the AUT. In order to fully characterize the cognitive flexibility construct, future research must deconstruct it, by including additional measures of cognitive flexibility, such as the Wisconsin Card Sort Test (55), or the Intra-Dimensional Extra-Dimensional set-shift CANTAB task (56).
To conclude, the present study demonstrated that both cognitive flexibility and habitual compulsivity acted as independent significant predictors of subclinical OCD symptomatology, but also exhibited an important interaction. The interaction between cognitive flexibility and habitual compulsivity accounted for almost half of the variance in subclinical OCD symptomatology. Furthermore, both cognitive inflexibility and habitual compulsivity are necessary for high levels of OCD symptoms, while neither is sufficient alone. These findings may prove useful for future research into both subclinical and clinical OCD traits, as well as other disorders involving cognitive inflexibility. The results may also help in the development of interventions targeting the impaired cognitive flexibility and maladaptive habits proposed to underlie OCD, thus helping to alleviate the debilitating symptoms that cause so many disruptions and difficulties in patients' daily lives.

DATA AVAILABILITY STATEMENT
The raw data supporting the conclusions of this article will be made available by the authors, without undue reservation.

ETHICS STATEMENT
The studies involving human participants were reviewed and approved by Cambridge University Psychology Department Research Ethics committee. The patients/participants provided their written informed consent to participate in this study.

AUTHOR CONTRIBUTIONS
SR, TR, and LZ: study conceptualization and write-up. SR and LZ: data collection and analysis. All authors contributed to the article and approved the submitted version.

FUNDING
This work was funded by Wellcome Trust, Grant/Award Number: 104631/z/14/z to TR and from Gates Cambridge Scholarship to LZ.